package model;

import java.io.Serializable;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;


@Entity
@Table(name="sgp_usuario")
@Inheritance(strategy=InheritanceType.SINGLE_TABLE) 
@AttributeOverrides(
		value={@AttributeOverride(name="id",column=@Column(name="id_usuario"))})
public class Usuario extends ObjBase implements Serializable {
    private String login;
    private String senha;
    private String nome;
    @OneToOne
    @JoinColumn(name="fk_permissao")
    private Permissao permissao;

    public String getLogin() {
        return login;
    }

    public void setLogin(String login) {
        this.login = login;
    }

    public String getSenha() {
        return senha;
    }

    public void setSenha(String senha) {
        this.senha = senha;
    }

    public String getNome() {
        return nome;
    }

    public void setNome(String nome) {
        this.nome = nome;
    }

    public Permissao getPermissao() {
        return permissao;
    }

    public void setPermissao(Permissao permissao) {
        this.permissao = permissao;
    }
    
    
}